/*
 * Copyright © 2017 eqxiu.com 北京中网易企秀科技有限公司  All rights reserved.
 */
package cn.hermit.data.xml;

import cn.hermit.data.xml.model.XmlAttribute;
import cn.hermit.data.xml.model.XmlCData;
import cn.hermit.data.xml.model.XmlComment;
import cn.hermit.data.xml.model.XmlElement;
import cn.hermit.data.xml.model.XmlHeader;

/**
 * Constants definition for <tt>XML</tt> parsing.
 * @see XmlParser
 * 
 * @author Jack Gao (Chinese name : GAO JIANGUO, Email : linux.gjg@gmail.com)
 * @date 19 Jun, 2014
 */
public interface XML {

	/**
	 * Constant for token delimiters of <tt>XML</tt> string.
	 * <p>
	 * <i><</i> is the start symbol of a {@link XmlElement XML element} and <i>></i> is the end symbol.
	 * <i>!</i> is the start symbol of a {@link XmlCData XML CData} or {@link XmlComment XML Comment}.
	 * <i>?</i> is the start and end symbol of {@link XmlHeader XML Header}
	 * <i>=</i> is delimiter of key and value in {@link XmlAttribute XML Attribute}
	 * <i>/</i> is the start symbol in end tag of a {@link XmlElement XML element}
	 * </p>
	 */
	String TOKEN_DELIMS = "<>!?=/";

	/**
	 * A status of <i>Deterministic finite automaton</i> for parsing XML string.
	 * 
	 * <p>
	 * This status will be turned on when parser walks in a XML string but outside XML Element and XML Header.
	 * It is used to declare the start or the end of XML parsing.
	 * </p>
	 * 
	 */
	byte STATUS_XML = 0;

	/**
	 * A status of <i>Deterministic finite automaton</i> for parsing XML string.
	 * 
	 * <p>
	 * This status will be turned on when parser walks in the body part of XML but not in XML tag.
	 * </p>
	 */
	byte STATUS_BODY = 2;

	/**
	 * A status of <i>Deterministic finite automaton</i> for parsing XML string.
	 * 
	 * <p>
	 * This status will be turned on when parser walks in XML tag.
	 * </p>
	 */
	byte STATUS_TAG = 3;

	/**
	 * Default null object string value in XML Text or Attribute value
	 * But for some cases, the null value need to be replaced by client possibly.<br>
	 * Here setHeader the default null value is <i>null</i>.
	 */
	String DEFAULT_NULL_VALUE = "null";

	/**
	 * Define the default empty value against {@link XML#DEFAULT_NULL_VALUE null value}
	 */
	String DEFAULT_EMPTY_VALUE = "";
	
}